<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<ng-container *ngIf="create">
    <div class="message-container">
        <span [innerHTML]="confrimLable"></span>
    </div>
</ng-container>

<ng-container *ngIf="!create">
    <div class="delete-warning-content">
        <span [innerHTML]="confrimLable"></span>
    </div>
    <div class="delete-index-warning-checkbox">
        <label lv-checkbox [(ngModel)]="confirmChecked" (ngModelChange)="confirmChange($event)">
            {{'common_warning_confirm_label' | i18n}}
        </label>
    </div>
</ng-container>

<lv-collapse [lvMultiExpansion]="'false'" lvType="simple" [lvAfterExpanded]="afterExpanded"
    [lvAfterCollapsed]="afterCollapsed">
    <lv-collapse-panel [lvTitle]="titleTpl" [lvExpanded]="true">
        <lv-pro-table #copyTable [config]="copyTableConfig" [data]="copyTableData"></lv-pro-table>
    </lv-collapse-panel>
</lv-collapse>

<ng-template #titleTpl>
    <span class="copy-collapse-title-text" *ngIf="expanded">{{'common_tucked_label'|i18n}}</span>
    <span class="copy-collapse-title-text" *ngIf="!expanded">{{'common_expand_label'|i18n}}</span>
</ng-template>

<ng-template #displayTimeTpl let-item>
    <lv-group lvGutter='14px'>
        <span>{{item.display_timestamp | date: 'yyyy-MM-dd HH:mm:ss' | nil }}</span>
        <span class="base-class" *ngIf="item.isBase">{{'protection_base_copy_label' | i18n}}</span>
    </lv-group>
</ng-template>

<ng-template #deleteHeaderTpl>
    <div class="aui-custom-modal-container">
        <i class="aui-custom-modal-icon" lv-icon="lv-icon-popup-danger-48"></i>
        <div class="aui-custom-modal-title">{{'protection_delete_index_label' | i18n}}</div>
    </div>
</ng-template>